const routes = [
  {
    path: '/login',
    component: () => import('../components/Login')
  },
  {
    path: '/home',
    component: () => import('../components/Home'),
    meta: {
      required: false
    },
    children: [
      {
        path: 'test1',
        component: () => import('../testComponent/childOne')
      },
      {
        path: 'test2',
        component: () => import('../testComponent/childTwo')
      }
    ]
  },
  {
    path: '/product',
    component: () => import('../components/Product'),
    meta: {
      required: false
    }
  },
  {
    path: '/technology',
    component: () => import('../components/Technology'),
    //  添加meta，可增加权限控制。当然权限显然由后台提供，在此只是假定进行模拟判断；
    meta: {
      required: true
    }
  },
  {
    path: '/service',
    component: () => import('../components/Service'),
    meta: {
      required: true
    }
  },
  {
    path: '/contact',
    component: () => import('../components/Contact'),
    meta: {
      required: false
    }
  },
  {
    path: '/more',
    name: 'more',
    component: () => import('../components/More'),
    meta: {
      required: false
    }
  },
  {
    path: '/order',
    component: () => import('../components/Order'),
    meta: {
      required: false
    },
    children: [
      {
        path: 'all',
        component: () => import('../components/order/All')
      },
      {
        path: 'needPay',
        component: () => import('../components/order/NeedPay')
      },
      {
        path: 'needUse',
        component: () => import('../components/order/NeedUse')
      },
      {
        path: 'needComment',
        component: () => import('../components/order/NeedComment')
      },
      {
        path: 'needService',
        component: () => import('../components/order/NeedService')
      }
    ]
  },
  {
    path: '/userInfo',
    component: () => import('../components/UserInfo'),
    meta: {
      required: false
    }
  },
  {
    path: '*',
    redirect: '/home'
  }
]
export default routes
